﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RuleCode.Table;

namespace map.product
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           
            if (!IsPostBack)
            {
                //填充区域
                FillDistrict();

            }
        }
        private void FillDistrict()
        {
            //todo:背景图引用安居客的了，要改过来
            DataTable a1;
            string sql = "";
            sql = " select recid,区编码 from varea3 where 省编码 =  '"
               + zfunction.Province + "'";
           a1 = RuleCode.Common.SqlHelper.Instance.ExecuteQuery(sql).Tables[0];
           
            foreach (DataRow item in a1.Rows)
            {
                Panel1.Controls.Add(new HyperLink() { Text = item["区编码"].ToString(), NavigateUrl = this.ResolveUrl("~/search/Product.aspx?" + item["recid"]) });
            }
           

        }
    }
}
